<template>
	<view class="cop-user-box">
		<cardHolderIndexList :indexList='indexList'>
		</cardHolderIndexList>
	</view>
</template>

<script>
	import cardHolderIndexList from '@/pagesBusiness/coupon/cardHolderIndexList.vue'
	export default {
		components: {
			cardHolderIndexList,
		},
		data() {
			return {
				indexList: [],
				userInfo: {}
			}
		},
		onLoad() {
			this.queryDefaultCards()
		},

		methods: {
			async queryDefaultCards() {
				let data = uni.getStorageSync('openId')
				if (data.openid) {
					this.openId = data.openid
				}
				let res = await this.$api.queryDefaultCard({
					openId: this.openId
				})
				if (res.success) {
					this.indexList = res.result
				} else {
					uni.showToast({
						title: '查询失败'
					});
					this.indexList = []
				}
			},
			// 转增

		}
	}
</script>

<style lang="scss" scoped>
	.cop-user-box{
		padding: 20upx;
	}
</style>
